package com.bert.service.impl;

public class SkyWalkingConstant {

    static final String QUERY_SERVICE = """
            query queryServices($layer: String!) {
              services: listServices(layer: $layer) {
                id
                value: name
                label: name
                group
                layers
                normal
                shortName
              }
            }""";

    static final String QUERY_TRACE = """
            query queryTraces($condition: TraceQueryCondition) {
               data: queryBasicTraces(condition: $condition) {
                 traces {
                   key: segmentId
                   endpointNames
                   duration
                   start
                   isError
                   traceIds
                 }
               }
            }""";

    static final String QUERY_SPAN = """
            query queryTrace($traceId: ID!) {
                trace: queryTrace(traceId: $traceId) {
                  spans {
                    traceId
                    segmentId
                    spanId
                    parentSpanId
                    refs {
                      traceId
                      parentSegmentId
                      parentSpanId
                      type
                    }
                    serviceCode
                    serviceInstanceName
                    startTime
                    endTime
                    endpointName
                    type
                    peer
                    component
                    isError
                    layer
                    tags {
                      key
                      value
                    }
                    logs {
                      time
                      data {
                        key
                        value
                      }
                    }
                    attachedEvents {
                      startTime {
                        seconds
                        nanos
                      }
                      event
                      endTime {
                        seconds
                        nanos
                      }
                      tags {
                        key
                        value
                      }
                      summary {
                        key
                        value
                      }
                    }
                  }
                }
            }""";
}
